.root {
  position: relative;
}

.placeholder {
  opacity: 0.7;
  font-style: italic;
}

.displayed {
  white-space: pre-wrap;
  word-wrap: break-word;
  pointer-events: none;
  overflow-wrap: anywhere;
}

.hidden {
  white-space: pre-wrap;
  word-wrap: break-word;
  pointer-events: none;
  overflow-wrap: anywhere;
  position: absolute;
  visibility: hidden;
  width: 100%;
  overflow: auto;
}

.focused {
  .block {
    background: var(--theme-focused-foreground);
  }

  .placeholder {
    background: var(--theme-focused-foreground);
  }
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.blink {
  animation: blink 1s step-start 0s infinite;
}

.block {
  display: inline-block;
  min-width: 1ch;
  background: var(--theme-text);
  height: calc(var(--font-size) * var(--theme-line-height-base));
  vertical-align: bottom;
}

.hiddenElement {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  color: transparent;
  background: transparent;
  caret-color: transparent;
  border: none;
  resize: none;
  outline: none;
  overflow: hidden;
  padding: 0;
  margin: 0;
  line-height: var(--theme-line-height-base);
  font-size: var(--font-size);
  font-family: inherit;
}
